function parsePropertyName() { if (tokType === _num || tokType === _string) return parseExprAtom();
function parseFunction(node, isStatement) { if (tokType === _name) node.id = parseIdent();
else if (isStatement) unexpected();
if (!first) expect(_comma); else first = false;
node.params.push(parseIdent());
var oldInFunc = inFunction, oldLabels = labels;
inFunction = true; labels = [];
node.body = parseBlock(true);
inFunction = oldInFunc; labels = oldLabels;
if (strict || node.body.body.length && isUseStrict(node.body.body[0])) { for (var i = node.id ? -1 : 0; i < node.params.length; ++i) { var id = i < 0 ? node.id : node.params[i];
if (isStrictReservedWord(id.name) || isStrictBadIdWord(id.name))
raise(id.start, "Defining '" + id.name + "' in strict mode");
if (i >= 0) for (var j = 0; j < i; ++j) if (id.name === node.params[j].name)
raise(id.start, "Argument name clash in strict mode");
return finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
function parseExprList(close, allowTrailingComma, allowEmpty) { var elts = [], first = true;
if (allowTrailingComma && options.allowTrailingCommas && eat(close)) break;
if (allowEmpty && tokType === _comma) elts.push(null);
else elts.push(parseExpression(true));
function parseIdent(liberal) { node.name = tokType === _name ? tokVal : (liberal && !options.forbidReserved && tokType.keyword) || unexpected();
tokRegexpAllowed = false;
return finishNode(node, "Identifier");